<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial=scale=1.0">
        <title>开启 Vue 之旅</title>
    </head>
    <body>
        <div id="app">
            <p>
                姓名：{{ state.name }}
            </p>
        </div>
        <!-- <script src="https://unpkg.com/vue@next"></script> -->
        <script src="https://unpkg.com/vue@3.5.12/dist/vue.global.js"></script>
        
        <script>
        	//Vue 现在存在于 Window 全局变量下，所以直接通过ES6解构出createApp, ref, reactive
            const { createApp, reactive} = Vue;
            const App = {
                setup() {
                    const state = reactive({
                        name:'尼克陈'
                    })
                        console.log("🚀 ~ setup ~ name:", name)
                    return{
                        state
                    };
                }
            };
            //通过createApp挂载实例到App节点下
            createApp(App).mount("#app");
        </script>
    </body>
</html>